package com.example.demo.config;

import com.example.demo.servlet.MyHttpServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ServletConfig {
    @Bean
    public ServletRegistrationBean myHttpServletRegistrationBean(){
        ServletRegistrationBean registrationBean = new ServletRegistrationBean(new MyHttpServlet(),"/myHttpServlet");
        return registrationBean;
    }
}
